﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddXunJia.aspx.cs" Inherits="ValuationClient.ProjectProspect.AddXunJia" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../jquery-easyui-1.5.2/themes/default/easyui.css" rel="stylesheet" />
    <link href="../jquery-easyui-1.5.2/themes/icon.css" rel="stylesheet" />
    <script src="../jquery-easyui-1.5.2/jquery.min.js"></script>
    <script src="../jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
    <script src="../jquery-easyui-1.5.2/easyloader.js"></script>
    <script src="../jquery-easyui-1.5.2/jquery.params.js"></script>
</head>
<body>
    <div class="demo-info">
        <div class="demo-tip icon-tip"></div>
        <%--<div>Fill the form and submit it.</div>--%>
    </div>
    <div style="margin: 0;"></div>
    <form id="form1" runat="server">
        <div class="easyui-panel" fit="true" style="border: none;">
            <div style="margin-left: 30px;" id="ff">
                <table>
                    <tr>
                        <td>项目号：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="xiangid" type="text" style="width: 800px;" readonly="true" />
                        </td>
                    </tr>
                    <tr>
                        <td>建议评估单价(元/㎡)：</td>
                        <td style="padding-left: 50px;">
                            <input class="easyui-textbox" id="price" type="text" style="width: 800px;" data-options="required:true" />
                        </td>
                    </tr>
                    <tr>
                        <td>询价内容及其他：</td>
                        <td style="padding-left: 50px;">
                            <textarea id="message" style="height: 60px; width: 800px;" placeholder="说点什么...最少输入10个字"></textarea>
                        </td>
                    </tr>
                </table>
            </div>
            <div style="text-align: center; padding: 5px">
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="add()">提交</a>
            </div>
        </div>
    </form>
    <script type="text/javascript">
        $(function () {
            var P_ReportNumber = $.query.get("id");//项目号
            $("#xiangid").val(P_ReportNumber);
        })

        function add() {
            var xiangid = $("#xiangid").val();//项目号
            var price = $("#price").val();
            var countent = $("#message").val();
      
            $.ajax({
                type: "post", //要用post方式                 
                url: "http://localhost:55439/api/Project/InsertEAInquiry",//方法所在页面和方法名
                data: { projectNumber: xiangid, inquiry_UnitPrice: price, inquiry_Content: countent },

                success: function (data) {
          

                    if (data == true) {
                        $.messager.alert("提示信息", "保存成功");
                    }
                    else
                        $.messager.alert("提示信息", "保存成功");
                }
            });
        }


    </script>
</body>
</html>
